﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QLHuongRungDAO;

namespace QLHuongRungBUS
{
    public class DonDatHangBUS
    {
        public DonDatHangBUS() { }
        private DonDatHangDAO ddhDAO = new DonDatHangDAO();
        public List<QLHREntities.DonDatHang> LayDanhSachDonDatHang()
        {
            return ddhDAO.LayDanhSachDonDatHang();
        }

        public List<QLHREntities.CTDDH> LayChiTietDonDatHang(int maDDH)
        {
            return ddhDAO.LayChiTietDonDatHang(maDDH);
        }

        public List<QLHREntities.ChiTietThucDon> LayChiTietThucDonByMaDDH(int MaDDH_CapNhat)
        {
            return ddhDAO.LayChiTietThucDonByMaDDH(MaDDH_CapNhat);
        }

        public void CapNhatTinhTrangGiao(int MaDDH_CapNhat)
        {
            ddhDAO.CapNhatTinhTrangGiao(MaDDH_CapNhat);
        }

        public void ThemDonDatHang(QLHREntities.DonDatHang donDatHang)
        {
            ddhDAO.ThemDonDatHang(donDatHang);
        }

        public int LayMaDDH()
        {
            return ddhDAO.LayMaDDH();
        }

        public void ThemChiTietDonDatHang(int size, List<QLHREntities.ChiTietDonDatHang> list_ChiTietDonDatHang)
        {
            ddhDAO.ThemChiTIetDonDatHang(size, list_ChiTietDonDatHang);
        }

        public void ThemChiTietThucDon(int size, List<QLHREntities.ChiTietThucDon> list_ChiTietThucDon)
        {
            ddhDAO.ThemChiTietThucDon(size, list_ChiTietThucDon);
        }
    }
}
